package com.simple.editor.ui;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;

/**
 * {@link MainPane} provides common container for all panels.
 * <p/>
 * Created with IntelliJ IDEA.
 * User: vlad
 * Date: 6/2/13
 * Time: 3:20 PM
 * To change this template use File | Settings | File Templates.
 */
public class MainPane extends JPanel {

    public MainPane(final FileTreePane fileTreePane, final TabbedEditorPane tabbedEditorPane,
                    final ChangesPane changesPane, final InfoPane infoPane) {
        setBorder(new EmptyBorder(4, 4, 3, 4));
        setLayout(new BorderLayout());

        add(fileTreePane, BorderLayout.WEST);
        add(tabbedEditorPane, BorderLayout.CENTER);

        final Box verticalBox = Box.createVerticalBox();
        verticalBox.setOpaque(false);
        verticalBox.add(changesPane);
        verticalBox.add(infoPane);
        add(verticalBox, BorderLayout.SOUTH);
    }
}

